import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {ServiceaComponent} from './modules/servicea/servicea.component';
import {ServicebComponent} from './modules/serviceb/serviceb.component';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {IndexComponent} from './common/index/index.component';
import {TokenService} from './common/token.service';

@NgModule({
  declarations: [
    AppComponent,
    ServiceaComponent,
    ServicebComponent,
    IndexComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    AppRoutingModule
  ],
  providers: [
    TokenService,
    {provide: HTTP_INTERCEPTORS, useClass: TokenService, multi: true}
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}
